<!DOCTYPE html>
<html>
<head>
    <#assign dicSelect=JspTaglibs["http://www.casic304.cn/dicSelect"] />
    <#assign secSelect=JspTaglibs["http://www.casic304.cn/secSelect"] />
    <#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />

    <meta charset="utf-8">
    <title>QC小组注册基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/forms/currencyCss.css">
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .qbdms-TBinformation {
            margin-left: 0;
            font-size: 15px
        }
        .qbdms-TBinformationText {
            margin-left: 145px;
        }
        .fillBtn{
            background:rgba(38,130,255,1) !important;
        }
    </style>
    <#if isClose == 'true'>
    <style>
        body.listBody{background: #fff}
        .listBody .qbdms-bodyDiv{padding: 0 }
        body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
        .layui-form-select .layui-input {padding-right: 0;}
        .fillBtn{
            background:rgba(38,130,255,1) !important;
        }
    </style>
</#if>
<#if isClose == 'true'>
<style>
    .listBody .qbdms-bodyDiv{padding: 0 }
    body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
    .treeFormPreview{position: unset;padding: 0;padding-top: 12px;margin-top: 80px;}
</style>
</#if>
</head>
<body class="listBody qbdms-particulars">
<#if flag !="1"&&flowStatus!='0'>
<div id="button" style="padding: 20px">
    <a class="layui-btn layui-btn-sm fillBtn" lay-event="" id="detail">
        <i class="iconfont iconicon_file"></i>
        <span>运行明细</span>
    </a>
    <a class="layui-btn layui-btn-sm flowChart fillBtn" lay-event="flowChart">
        <i class="layui-icon layui-icon-picture-fine"></i>
        <span >流程图</span>
    </a>
    <a class="layui-btn layui-btn-sm fillBtn" lay-event="" id="taskOpinion">
        <i class="iconfont iconicon_compile"></i>
        <span>审批历史</span>
    </a>
</div>
</#if>

<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body">
        <#if isClose != 'true'><div class="qbdms-formTitle">QC小组注册<#if flag !="1"><i class="qbdms-returnOn closeWindow">返回</i></#if></div></#if>
    <form class="layui-form" requrl="${ctx}/qbdms/wQbdQcGroup/get" lay-filter="wQbdQcGroupDataForm">
        <div class="" style="width: 100%;overflow-x: auto">
            <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr id="tbxx"></tr>
                <tr>
                    <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
                    <td ><@secSelect.sec_select data_src=1 required=true name="secret"/></td>
                    <td class="qbdms-zeroTable-lable">QC小组名称<span style="color: red;">*</span></td>
                    <td name="groupname"></td>
                    <td class="qbdms-zeroTable-lable">注册单位<span style="color: red;">*</span></td>
                    <td name="registerdept"></td>
                </tr>
                <tr>
                    <td class="qbdms-zeroTable-lable">注册编号</td>
                    <td name="registernum"></td>
                    <td class="qbdms-zeroTable-lable">课题名称<span style="color: red;">*</span></td>
                    <td name="subjectname"></td>
                    <td class="qbdms-zeroTable-lable">注册时间<span style="color: red;">*</span></td>
                    <td name="registerdate"></td>
                </tr>

                <tr>
                    <td class="qbdms-zeroTable-lable">计划完成时间</td>
                    <td name="finishdate"></td>
                    <td class="qbdms-zeroTable-lable">组长</td>
                    <td name="groupleader"></td>
                    <td class="qbdms-zeroTable-lable">小组成员</td>
                    <td name="groupMembers"></td>
                </tr>

                <tr>
                    <td class="qbdms-zeroTable-lable">小组类别</td>
                    <td ><@dicSelect.dic name="groupCategory" nodeKey="xzlb" /></td>
                    <td class="qbdms-zeroTable-lable">人数</td>
                    <td name="peopleamount"></td>
                    <td class="qbdms-zeroTable-lable">联系人</td>
                    <td name="linkman"></td>
                </tr>

                <tr>
                    <td class="qbdms-zeroTable-lable">联系电话</td>
                    <td name="linktel"></td>
                    <td class="qbdms-zeroTable-lable">带来的经济效益（万元）</td>
                    <td name="economicPerformance" colspan="3"></td>
                </tr>

                <tr>
                    <td class="qbdms-zeroTable-lable">目标及预期效果</td>
                    <td name="targeteffect" colspan="5"></td>
                </tr>
                <tr>
                    <td class="qbdms-zeroTable-lable">备注</td>
                    <td name="remark" colspan="5"></td>
                </tr>
                <#if flag =="1">
                <tr>
                    <td class="qbdms-zeroTable-lable">
                        研究室主管领导审批
                    </td>
                    <td colspan="5">
                        <#list taskOpinionNewList as taskOpinionNewList>
                        <#if taskOpinionNewList.taskName == "研究室主管领导审批">
                        <p>${taskOpinionNewList.opinion}</p><br/>
                        <p style="text-align:right;">审批人:${taskOpinionNewList.exeFullname}&nbsp&nbsp&nbsp&nbsp
                            日期:${(taskOpinionNewList.endTime?string("yyyy-MM-dd"))!}</p>
                    </#if>
                </#list>
                </td>
                </tr>
                <tr>
                    <td class="qbdms-zeroTable-lable">
                        质量综合助理确定
                    </td>
                    <td colspan="5">
                        <#list taskOpinionNewList as taskOpinionNewList>
                        <#if taskOpinionNewList.taskName == "质量综合助理确定">
                        <p>${taskOpinionNewList.opinion}</p><br/>
                        <p style="text-align:right;">审批人:${taskOpinionNewList.exeFullname}&nbsp&nbsp&nbsp&nbsp
                            日期:${(taskOpinionNewList.endTime?string("yyyy-MM-dd"))!}</p>
                    </#if>
                </#list>
                </td>
                </tr>
                </#if>
                </tbody>
            </table>
            <input type="hidden" name="id" placeholder="请输入"
                   autocomplete="off" class="layui-input  textInput"
                   maxlength="50" fieldname="id">
            <input type="hidden" name="registerdeptid" placeholder="请输入"
                   autocomplete="off" class="layui-input  textInput"
                   maxlength="50" fieldname="registerdeptid">
            <input type="hidden" placeholder="未填写" autocomplete="off" class="layui-input dateTimeFiled input-right time-init" name="awardDate" format="yyyy-MM-dd" datetype="date" lay-verify="required" lay-reqtext="获奖时间是必选项">
            <input type="hidden" name="registerdate" placeholder="请输入" readonly="readonly"
                   autocomplete="off" class="layui-input dateTimeFiled input-right time-init"
                   lay-reqtext="注册时间是必填项" maxlength="50" lay-verify="required">
            <input type="hidden" name="finishdate" placeholder="请输入" readonly="readonly"
                   autocomplete="off" class="layui-input dateTimeFiled input-right time-init"
                   lay-reqtext="计划完成时间是必填项" maxlength="50">

        </div>

        <#if isClose != 'true' && flag !="1">
        <div class="layui-form-item btnformItem">
            <p>
                <button type="reset" id="closeWindow" class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回</button>
            </p>
        </div>
        </#if>

        </form>
    </div>
</div>
</div>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>

    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','setter', 'propsHandle', 'laydate', 'jquery','commonDialog', 'common','publicMethods','qbdmsForm'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var common = layui.common;
        var publicMethods = layui.publicMethods;
        var propsHandle = layui.propsHandle;
        var dateTimeFiledLen = $(".dateTimeFiled");

        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }
        var defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                initCss: [
                    // 'style/forms/grid/grid1',
                    // 'style/forms/grid/grid2',
                    // 'style/forms/grid/grid3',
                    // 'style/forms/template/tag',
                    // 'style/forms/template/text',
                    // 'style/forms/template/table',
                    // 'style/forms/template/textArea',
                    // 'style/forms/template/radioOption',
                    // 'style/forms/template/date',
                    // 'style/forms/template/button',
                    // 'style/forms/template/uploadFile',
                    // 'style/forms/template/richText',
                    // 'style/forms/template/select',
                    // 'style/forms/template/checkOption',
                    // 'style/forms/template/dataLexi',
                    // 'style/forms/template/uploadImg',
                    // 'style/forms/template/selector',
                    // 'style/forms/formDevise',
                    // 'style/forms/dragLay',
                    // 'style/forms/formPreview'
                ],// formAreaInfo:'.formPreview',
                formAreaInfo: 'html',
                temDate: '.temDate',
                uploadFileBtn: '.uploadFileBtn',
                uploadImgBtn: '.uploadImgBtn',
                richTextArea: '.richTextArea',
                selectInput: '.selectInput',
                radioOptionCont: '.radioOptionCont',
                dataLexiTree: '.dataLexiTree',
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle()  // 实例化模板功能部分
        ;


        // 初始化模板功能
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });
        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            window.location.href = serverPath.qbdmsPath  + '/qbdms/wQbdQcGroup/view/list';
        });

        var runId = "${runId}";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }

        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name: 'wQbdQcGroupDataForm',
            idValue: "${id}",
            primary: "id",
            getCallback: function (data) {
                $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</td>");

                // $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span><span class='qbdms-TBinformationText'>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</span>");
                $("input[name='groupMembers']").attr("ids", data.data.groupmembersid);
                $("input[name='groupleader']").attr("ids", data.data.groupleaderid);
                $("input[name='linkman']").attr("ids", data.data.linkmanid);
            }
        });

        publicMethods.bottomFixd()
        $("body *").not("#closeWindow").attr("disabled", "disabled");
        $(".uploadFileCont .qbdms-fileUp,.uploadFileCont i,.addFormTr1").hide();
        $(".uploadFileCont").each(function () {
            if ($(this).children('.uploadFileList').children().length == 0) {
                $(this).children('.uploadFileList').append("<span style='color: #C0C4CC'>未上传</span>")
            }
        })





        var flag="${flag}";
        var procInstId = "${processRun.procInstId}";
        var runId = "${runId}";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }

        //运行明细
        $("#detail").click(function () {
            layer.open({
                type: 2,
                title: "运行明细",
                area: ['80%', '80%'],
                btn: ['关闭'],
                skin: 'btn-close',
                btnAlign: 'c',
                content: serverPath.qbdmsPath +'/workflow/processRun/view/detail?runId=' + runId
            });
        });

        //审批历史
        $("#taskOpinion").click(function () {
            parent.layer.open({
                type: 2,
                title: "审批历史",
                area: ['950px', '585px'],
                content: serverPath.qbdmsPath +"/workflow/taskOpinion/view/list?runId=" + runId
            })
        });

        //流程图
        $(".flowChart").click(function () {
            parent.layer.open({
                type: 2,
                title: "流程图",
                shade: 0.3,
                left: 200,
                area: ['1000px', '600px'],
                content: serverPath.qbdmsPath +"/workflow/processRun/view/bpmImg?procInstId="+procInstId+"&runId="+runId,
                btn:['','关闭'],
                success:function (layero,index) {
                    $(layero).find("a.layui-layer-btn0").hide();
                }
            });
        });

    });
</script>
</body>
</html>